﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DanhSachBenhNhanCho.aspx.cs" Inherits="ToaThuoc_PAK.DanhSachBenhNhanCho" %>
<%@ Register TagPrefix="uc1" TagName="phongkhammenu" Src="~/UserControls/phongkhammenu.ascx" %>
<%@ Register TagPrefix="uc1" TagName="about" Src="~/UserControls/about.ascx" %>
<%@ Register TagPrefix="uc1" TagName="menu" Src="~/UserControls/menu.ascx" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link href="css/smoothness/jquery-ui-1.10.4.custom.min.css" rel="stylesheet" />
    <link href="css/nghiepvuy.css" rel="stylesheet" />
    <link href="css/ToaThuoc.css" rel="stylesheet" />
    <script src="js/jquery-1.11.0.min.js" type="text/javascript"></script>
    <script src="js/jquery-ui-1.10.4.min.js" type="text/javascript"></script>
    <script src="js/jquery.ui.datepicker-vi.js" type="text/javascript"></script>
    <title>Danh sách bệnh nhân chờ</title>

    <script type="text/javascript">
        $(document).ready(function () {
            $('#txtTuNgay').datepicker();
            $('#txtDenNgay').datepicker();
        });

        function showdsdangky(id1, id2, index) {
            self.location = "toathuoc.aspx?s_idthu=" + id1 + "&s_mabn=" + id2 + "&index=" + index;
        }
    </script>
</head>
<body>
    <form id="formDSBenhNhanCho" runat="server" method="post">
    <div style="min-height:600px;">
        <table style="width:100%; vertical-align:top" border="0">
            <tr>
                <td><uc1:menu id="Menu1" runat="server"></uc1:menu></td>
            </tr>
            <tr>
                <td><uc1:phongkhammenu id="Phongkhammenu1" runat="server"></uc1:phongkhammenu></td>
            </tr>
            <tr>
                <td>
                    <table>
                        <tr>
                            <td style="height: 31px">
                                <div id="Tim" align="center" runat="server">
                                    <asp:RadioButtonList Style="float:left; vertical-align:middle" AutoPostBack="true" ID="ragViewType" runat="server" RepeatDirection="Horizontal" OnSelectedIndexChanged="ragViewType_SelectedIndexChanged">
                                        <asp:ListItem Value="TrongNgay">Trong ngày</asp:ListItem>
                                        <asp:ListItem Value="TatCa">Tất cả</asp:ListItem>
                                    </asp:RadioButtonList>
                               <%-- <asp:radiobutton id="rag_TrongNgay" runat="server" GroupName="group" Text="Trong ngày" AutoPostBack="True" Checked="True"></asp:radiobutton>&nbsp;
							    <asp:radiobutton id="rag_TatCa" runat="server" GroupName="group" Text="Tất cả" AutoPostBack="True"></asp:radiobutton>&nbsp;&nbsp;--%>
                                MaBN:&nbsp;
                                <input id="txtmabenhnhan" type="text" runat="server" style="width: 69px" maxlength="10" />&nbsp;&nbsp;&nbsp;
                                Tên: <asp:textbox id="txttenbenhnhan" style="text-transform:uppercase;" runat="server" Width="134px" MaxLength="40"></asp:textbox>&nbsp;
							    <asp:label id="Label1" runat="server">Từ ngày</asp:label>&nbsp;
                                <input id="txtTuNgay" style="width: 70px;" type="text" runat="server" />&nbsp;&nbsp;
                                <asp:label id="Label2" runat="server">đến ngày</asp:label>&nbsp;
                                <input id="txtDenNgay" style="width: 71px;" type="text" runat="server" />
                                &nbsp;
                                <asp:CheckBox ID="chkChoDonThuoc" runat="server" Text="Chờ đơn thuốc" />
							    &nbsp;
                                <asp:button id="btnTimKiem" runat="server" Text="Tìm" Width="47px" OnClick="btnTimKiem_Click"></asp:button></div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:GridView ID="gridView" AutoGenerateColumns="false" runat="server" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" EnableModelValidation="True" AllowPaging="True" OnDataBound="gridView_DataBound" OnRowDataBound="gridView_RowDataBound" OnSelectedIndexChanging="gridView_SelectedIndexChanging" PageSize="20" OnPageIndexChanging="gridView_PageIndexChanging">
                                    <FooterStyle BackColor="White" ForeColor="#000066" />
                                    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                    <RowStyle ForeColor="#000066" />
                                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                    <Columns>
                                        <asp:BoundField Visible="false" DataField="TDCT"/>
                                        <asp:BoundField ItemStyle-HorizontalAlign="Center" HeaderText="STT" DataField="STT" />
                                        <asp:BoundField ItemStyle-HorizontalAlign="Center" HeaderText="Ngày đăng ký" DataField="NgayDangKy" DataFormatString="{0:dd/MM/yyyy HH:mm}" />
                                        <asp:BoundField HeaderText="Mã BN" DataField="MaBN" ItemStyle-HorizontalAlign="Center"/>
                                        <asp:BoundField HeaderText="Họ tên" DataField="HoTen" />
                                        <asp:BoundField HeaderText="Năm sinh" DataField="NamSinh" ItemStyle-HorizontalAlign="Center"/>
                                        <asp:BoundField HeaderText="Tên dịch vụ" DataField="TenDichVu" />
                                        <asp:BoundField HeaderText="Loại khám" DataField="LoaiKham" ItemStyle-HorizontalAlign="Center"/>
                                        <asp:BoundField HeaderText="Trạng thái" DataField="TrangThai" ItemStyle-HorizontalAlign="Center"/>
                                        <asp:TemplateField HeaderText="Ưu tiên" ItemStyle-HorizontalAlign="Center">
                                            <ItemTemplate>
                                                <asp:Label runat="server" Text='<%# ((bool)Eval("uutien")) == true ? "X" : "" %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField HeaderText="Đối tượng" DataField="DoiTuong" ItemStyle-HorizontalAlign="Center"/>

                                    </Columns>
                                </asp:GridView>
                               <%-- <asp:DataGrid id="dataGrid" runat="server" Width="100%" BorderColor="#CCCCCC" BorderStyle="None"
										BorderWidth="1px" BackColor="White" CellPadding="3" AutoGenerateColumns="False" OnItemDataBound="dataGrid_ItemDataBound" OnSelectedIndexChanged="dataGrid_SelectedIndexChanged">
										<FooterStyle ForeColor="#000066" BackColor="White"></FooterStyle>
										<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#669999"></SelectedItemStyle>
										<ItemStyle ForeColor="#000066"></ItemStyle>
										<HeaderStyle Font-Bold="True" HorizontalAlign="Center" ForeColor="White" BackColor="#006699"></HeaderStyle>
										<Columns>
										
											<asp:BoundColumn Visible="False" DataField="IDCT"></asp:BoundColumn>
											<asp:BoundColumn DataField="STT" HeaderText="STT">
                                                <ItemStyle HorizontalAlign="Center" />
                                            </asp:BoundColumn>
                                            <asp:TemplateColumn HeaderText="Ng&#224;y đăng k&#253;" ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" Text='<%# Eval("NgayDangKy","{0:dd/MM/yyyy HH:mm}") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
											<asp:BoundColumn DataField="MaBN" HeaderText="M&#227; BN">
                                                <ItemStyle HorizontalAlign="Center" />
                                            </asp:BoundColumn>
											<asp:BoundColumn DataField="HoTen" HeaderText="Họ T&#234;n"></asp:BoundColumn>
											<asp:BoundColumn DataField="namsinh" HeaderText="Năm sinh">
                                                <ItemStyle HorizontalAlign="Center" />
                                            </asp:BoundColumn>
											<asp:BoundColumn DataField="TenDichVu" HeaderText="T&#234;n dịch vụ"></asp:BoundColumn>
											<asp:BoundColumn DataField="loaikham" HeaderText="Loại kh&#225;m">
                                                <ItemStyle HorizontalAlign="Center" />
                                            </asp:BoundColumn>
											<asp:BoundColumn DataField="TrangThai" HeaderText="Trạng th&#225;i">
                                                <ItemStyle HorizontalAlign="Center" />
                                            </asp:BoundColumn>
                                            <asp:TemplateColumn HeaderText="Ưu ti&#234;n" ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" Text='<%# ((bool)Eval("uutien")) == true ? "X" : "" %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
											<asp:BoundColumn DataField="doituong" HeaderText="Đối tượng">
                                                <ItemStyle HorizontalAlign="Center" />
                                            </asp:BoundColumn>
											
										</Columns>
										<PagerStyle HorizontalAlign="Left" ForeColor="#000066" BackColor="White" Mode="NumericPages"></PagerStyle>
									</asp:DataGrid>--%>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>            
        </table> 
        
    </div>
        <uc1:about id="About1" runat="server"></uc1:about><asp:literal id="Literal1" runat="server"></asp:literal>      
    </form>
</body>
</html>
